home *** CD-ROM | disk | FTP | other *** search
- From: RMarlowe@msn.com (Roger Marlowe)
- Subject: RE: An array of structures in C, C++?
- Date: 28 Jan 96 23:42:21 -0800
- References: <4e6j2l$ehm@geraldo.cc.utexas.edu>
- Message-ID: <00001a81+00009572@msn.com>
- Path: news.msn.com!msn.com
- Newsgroups: comp.lang.c++
- Organization: The Microsoft Network (msn.com)
-
- The answer is yes. Declare a pointer of type whatever-the-struct-name-is
- and then establish an array of these pointers....
-
- structname *pointername;// pointer to a struct
- structname *arrayname[SIZE];//an array of structs
-
- I believe you will have to use the 'new' operator to generate each
- element of your array.
-
- This opinion comes with the standard disclaimer....
-